Skip to content

Add CLAUDE.md guide and pixel game hub launcher#21

Draft
blackboxprogramming wants to merge 4 commits intomainfrom
claude/claude-md-ml782dkg5pxhk2xe-Zb6h7
Draft

Add CLAUDE.md guide and pixel game hub launcher#21
blackboxprogramming wants to merge 4 commits intomainfrom
claude/claude-md-ml782dkg5pxhk2xe-Zb6h7

Conversation

@blackboxprogramming
Copy link
Contributor

Summary

This PR establishes the foundational documentation and interactive UI for the BlackRoad OS Bridge repository. It introduces CLAUDE.md as the central AI assistant guide and creates a polished game hub launcher for the pixel worlds ecosystem.

Key Changes

  • CLAUDE.md - Comprehensive 244-line guide for AI assistants covering:

    • Repository purpose and structure (15-org ecosystem, routing thesis)
    • Complete directory map with all subdirectories and files
    • Naming conventions, coding style, and design system specifications
    • Development workflows for games, orgs, and prototypes
    • AI decision authority framework (FULL_AUTO/SUGGEST/ASK_FIRST)
    • Infrastructure summary and quick commands
  • blackroad-pixel/games/index.html - Interactive game hub featuring:

    • Starfield background with twinkling animation
    • 4-game grid layout (responsive, 2-col desktop / 1-col mobile)
    • Individual game cards with:
      • Thematic preview backgrounds (farm, space, pink, platformer)
      • Game-specific badges (FARM SIM, PIXEL RPG, VIRTUAL PET, PLATFORMER)
      • Feature descriptions and tag lists
      • Hover animations and color-coded play buttons
    • BlackRoad brand gradient bars and Press Start 2P typography
    • Links to stardew/, pokemon/, webkinz/, and mario/ game directories

Implementation Details

  • Design System: Consistent use of BlackRoad color palette (#ff6b9d, #c44dff, #00d4ff, #7ed321, #f5a623)
  • Accessibility: Semantic HTML, proper contrast ratios, mobile viewport meta tag
  • Performance: Single-file HTML with embedded CSS/JS (no external dependencies except Google Fonts)
  • Navigation: Back link to desktop, footer with copyright and links
  • Theming: Dark theme (#050510 bg) with animated starfield, BEM-like CSS class naming

Notes

  • CLAUDE.md serves as the "Rosetta Stone" for understanding the entire Bridge repository structure
  • Game hub is fully self-contained and can be served from any static host
  • All 4 game worlds (Harvest, Creatures, Pets, Runner) are now discoverable from a single entry point

https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9

- BlackRoad Harvest: Stardew Valley-inspired farming sim with crops, seasons, shop, day/night cycle
- BlackRoad Creatures: Pokemon-inspired RPG with 8 creatures, battles, type matchups, capture, leveling
- BlackRoad Pets: Webkinz-inspired virtual pet world with 6 pets, 5 rooms, minigame, shop, decor
- BlackRoad Runner: Mario-inspired platformer with 3 worlds, physics, enemies, power-ups, coins
- Game hub launcher page linking all worlds
- Comprehensive CLAUDE.md documenting repo structure, conventions, and workflows

https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9
Creatures (Pokemon): Expanded to 50x40 overworld with 5 zones, healing center,
Pokedex, 3 trainer battles, item shop, PP system, critical hits, smart AI,
zone-specific encounter tables, and level-up animations.

Harvest (Stardew): Added weather system (rain/storm/snow), 4 NPCs with
relationship/gifting, fishing minigame with 4 fish types, animals (chickens/cows),
crop quality system, particle effects, fireflies, and expanded 30x22 world.

https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9
Pets (Webkinz): Added friendship/level system (1-10), pet naming, 3 minigames
(Catch Treats with combos, Memory Match, Rhythm Tap), dress-up system with
accessories, Adventure Room for exploration, 10+ achievements, enhanced pet AI
with mood emotes, daily login bonus, wallpapers, and more shop items.

Runner (Mario): Expanded to 5 worlds including Ice World and Castle/Boss.
Added fire flower power-up with fireball shooting, piranha plants, flying
goombas, bullet bills, boss fight, moving platforms, variable jump height,
coyote time, sprint, checkpoints, pipe warps to bonus rooms, 3-layer parallax
scrolling, and chain stomp score multipliers.

https://claude.ai/code/session_016tjFc6t2emynRTw5Mbi9Y9

function showBanner(text) {
const banner = document.getElementById('level-banner');
banner.innerHTML = text.replace('\n', '<br>');

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of '\n'.

Copilot Autofix

AI 11 days ago

To fix the problem, we should ensure that every newline character in text is converted to an HTML line break, not just the first one. The idiomatic way in JavaScript is to use a regular expression with the global flag: text.replace(/\n/g, '<br>'). This addresses the specific CodeQL concern about only the first occurrence being replaced.

The best minimal fix, without changing behavior otherwise, is to modify line 2039 in blackroad-pixel/games/mario/index.html so that text.replace('\n', '<br>') becomes text.replace(/\n/g, '<br>'). No additional imports or helper methods are needed, and the function’s external interface stays the same—only the handling of multiple newlines is improved. This change is fully contained within the showBanner function and does not affect other code.

Suggested changeset 1
blackroad-pixel/games/mario/index.html

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/blackroad-pixel/games/mario/index.html b/blackroad-pixel/games/mario/index.html
--- a/blackroad-pixel/games/mario/index.html
+++ b/blackroad-pixel/games/mario/index.html
@@ -2036,7 +2036,7 @@
 
 function showBanner(text) {
   const banner = document.getElementById('level-banner');
-  banner.innerHTML = text.replace('\n', '<br>');
+  banner.innerHTML = text.replace(/\n/g, '<br>');
   banner.style.display = 'block';
   setTimeout(() => { banner.style.display = 'none'; }, 3000);
 }
EOF
@@ -2036,7 +2036,7 @@

function showBanner(text) {
const banner = document.getElementById('level-banner');
banner.innerHTML = text.replace('\n', '<br>');
banner.innerHTML = text.replace(/\n/g, '<br>');
banner.style.display = 'block';
setTimeout(() => { banner.style.display = 'none'; }, 3000);
}
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants